it works with 1 hidden layer