substitute apply with commit for backwards compatibility