extra code for client