fixing implementation 3