Solved 15.1 (in a very ugly way using global variables)