Used defer to make code cleaner
Used defer to make code cleaner
Used flag.Int rather than parsing a string (RTFM)