How can I create a cubic weight calculator?