hackish implementation of a client