switched json to use mongolab
added a factory