sort of functional, needs a better way of inheriting