refactoring API to compatibility with jdk 1.6
tests as examples of using try and option. updated some version of maven plugins