created factory with association