complete logic for install command