simple parsing logic