Rewritten for new api.