Making the code more concise