fixed calling subprocess method