better error checking
see if everything works now