few modifications to the code in order to start playing with a categorical response variable