finished up the main methds and test framework..