added factory template