more client stuff
slightly modified