Fork from bloxboy site by sveetch