remove mongodb call in factories