initial factory method and improved example in sandbox