Modified some variables etc...

This version gets timelimit exceded.