changed a major error in the resize function that I caused when I edited the function origionally