add pedantic errors and fix them