Created code for setup of client