compute efficiency : refacto + first unit test