pulled out server code - this is client only now