changed the retreive_all method to return an array of entity objects.