added inverted section

and refactored ugly setTimeout repetition