added basic patch utils