made the code cleaner