Better function wrapping for :update