merge indent logic together