added license
added samples
fixed code format