cleaned up code submited in commit [9ebcaa0]