modularized install function