add helloword sample
refactory code