apply and kwapply