wrapped function around contents