function factory, added no factory examples for review