altering code for client