working for the get method properly