more chain functionality + tests
in the middle of a mess