changed type definition to check first char for r/w, last char of type starting with r for priority digit, and last char of non r/w types (=update type) for "w" indicating update write