compute order cost correctly