reference implementations