Moved install function