refactoring Int function upto ➞ to and adding support for reverse range