indent algorithm