Added profiling using gprof