extracted a common interface for Java and Scala implementation
some special outcomes
completed special outcomes