more strict err checking