Add initial implementation of weight calculations