implementation of self organizing maps