fixed all the errors i introduced by trying to use callbacks.