fix some pep 8, need to fix resize math, but it still works