realize artificial neural network using matrix operations (fix type missmatch)