move absorb method from main.js to constructor.js and hide it
add substr method