wrote parent functions and handlers, still need to finish up error checking