hopefully working polymorphism - but needs more extensive testing