major separation of scala and java algos