added auto hide and auto center