more cleaning towards Brian's programming style