fixing gmN number of events to be an integer
tidying and commiting everything