implement interfaces and tests