All of the functions are written, debugging needed