final code manipulation done to have a better record of time