minor cleanup to make it closer to the paper version