untested code cleanup