cleaned up client controller