this should be private
add some javadocs