removed duplication for command line execution