new algorithm
fixing hidden div, updating algorithm