client functionality