resolve pass by ref
make fn displaySessionError static