process different format lines