finished adjusting function