better parsing solution