add new method to detect whether scroll bar exists