The code is not the most accurate due to my attempts to do it myself and fix other errors, I apologize in advance