refactor objects for inheritance