working on chain size calculations