duplicate code removed from newscontroller