added source file and sample code in README