this file needs formatting and javadocs.