add new class for validate records
re format code and remove unwanted codes