refactoring to switch/case
changing package name for client subpackage