made the code more condensed