implemented autohide feature