fixed findById function to return class objects correctly after change of naming convention