Added time measuring
added documentation