added factory and helpers