added factory processing