fix #5, rewrite the indent function