working on subprocess logic