function parse works with well-formated input