Add function patch code for later use