added source code and initial documentation