splitting out client functionality