restructure, use mongoose