Cost calculation added