reworking API based on further reading of mongoose