add support for package install/remove
refactoring