added cost calculation in simulator