updated mongoose to version 5.6 with associated required changes