added javadocs and logs