fix to match existing interface and add missing tests