simplified parsing logic.