added list support to mapply