apply should work for arbitrary operations