The laser as nonlinear element for an optical associative memory