initial refactoring attempts with @rloomba