format code properly