fix ugliness in code, take that Dale!