Added variable checkers for fuction withinBounds