@senhorzinho  
* see the other code where you were using session_template which i modified. you should probably unify them into one function so that you dont have to copy paste code.