refactor bit manipulations, clear validate bit