remove semicolons and if statement