Added Rohan's cleaner code suggestion.