updating some code because apparently someone linked to this repo on reddit 0.0