updated to Allisters latest version, brought over from dropbox