additional work on the apply method