moved main code to subbable.js