activation function added (seems to work)