adding flash messages and moar code