adding works, and a bit of refactoring