Developing the frame_parser() function