Added code to all controllers