class inhertence

JS

Please review and merge if you are happy