wrote some initial code for som adaptation