improve countries line parsing