refactored methods of installing packages on client