added possibility of dynamic types (proof of concept, more work has to be put into this if it gets approved)