Updated for better parsing