converted some methods to jQuery