shifted to more domain layer pattern to better separation of concerns