Initial commit of the code

code and some junit tests