Improved $apply call