use the right syntax for .apply