Moved calculateIndent