add comments for apply()