prepared implementation of client