err checking for wordstore error
use switch statement