update adapt resolution algorithm again