changed some of the functions and such so that it is more organized