use own .mapply instead of mapply