tests + factory methods refactor