client functions for lab 5