update apply and map