more flexible parser