Comments, extracting methods, added test, Handled edge case