changed method of using python, now using system calls