adding factory dependency for db