4767 preprocess subroutine