rm deadcode
deal with missing data for response.pattern inputs better