gave all if statements {, } to be safe