subscribe on client done. todo server side
cleaned code
cleaned code