removed function euclidean, replaced with math.fabs
refactored min3 function
stlye improvments