Added miss penalty calculation