cleaned up code(got rid of unnecessary code)