Add javadoc
Simplify method