different implementation of run command