write answer classes and fix some structure issues