Changed the global variables s and y. Resolves #1.