modified get_rate_of_object in methods.py