Added wrap function