Updated to allow the command to run from console