added factory class