adding code in cut/paste style from bsv to get class structures ready