code cleanup to helpers