address comments, wrap functions