fix format

Fix the indent and dialyzer issue with the new code.