integrated functions together + added some error handling, install command works now