I've been updating my comment, try the code in there