Modifications to string-variable function. Conditions to go to passing points were changed. General structure was modified