refactored matching items from the database by id, started implementing a basic entity