added factory tests