added some comments, made test better... and found bug