fixed brew install command and added another helper function