removed all use of subprocess