fixed power consumption #3 and refacto (i miss the second commit)