adjusts and autosize implementation