cleanup to make it somewhat readable