proper validation of reply code