adding order calculation