remove the Session usage and clean code