v1.2 (refactoring due to new runcmd and some fixes)