first commit for java solution