rewrote to new server client system - needs testing