add check in while loop of parse field func