divided common into files
improved client functionality