added automatic consumption measurement
added exit key