removed completly java part
Ported to scala