helper to update bodies of functions, closes #1