Step function modified, now the output is either 1 or -1