major refactoring to make client more friendly
forgot something