implementing a component entity system