patching Angular functions