new factories and unit tests