clean code and added client objects