first cut, apparently working