made the code more clear