cost calculation added