This is the original project code, i can edit it later, i don't think this has to do with the question about the error.