finished very broken client side prototype
refactored client side