wip, refactoring client side handling