fix formatting and regex