draft implementation of calculations