minor refactoring
fix inheritance
fixed conflict
fix virtual methods and inheritance