cleaning up package install logic