added .gitignore
added factory method sample