changed to Requests library and created class for query