a bit refactured