switched to OO JS style