use session and flash