Untested work on chain generation