moved a lot of things around because of flask