added factory generator