fixed if statement, fixed the printf function