now with better parsing