added factory prototype