refactor for multiple inheritance
refactor for multiple inheritance