improved status messages controller code