added action_hook to autopopulate mongoDB