refact + getEuclNorm fixed + some bugs fixed