updated javadoc + small refac