added jsdoc and fixed override construct method