more coding guideline stuff - make some functions easier to read