make code more readable by extracting magic numbers fix interface range