getting the index and the save action ready for mongoose object