Changed the code to that found on /g/