switching from subprocess to commands