got calculation working