apply format code