made the code slightly clearer