JAVA final

final functional code for v0.1