Added some calculation functionality