added source code and docs