code used in the IJCNN2014 publication