added implementation of contract tests