Found this file on the internet a couple of years back with the intention of improving on it.
Are you sure you want to continue?