add and show functions implemented with mongodb