rewrote this so it doesnt suck
correct file extensions for everybody