Implement parsing logic