updated patch api to reflect current functionality