Added time profile. Still some debug to do