finished locations_generator and added basic function test