huge refactor, component based