Added time measurement and several comments