Made code more compact