added sql tables & prize functions