Database driven. second phase.