#18 refactoring with -Wall