trying to get the patch function to work

doesn't compile as is