improved readability of some code