Improved and optimised: I can't ever beat it :) Code a lil' hacky as debugging my code got real tedious real quick