rest of source code and initial testing