Shortened code a little and changed comment