added some error checking with toast