refactired entities, tested