added utility functions
refactor
new AI attempt
java docs