rewrote with mvvm paradigm using session scope bean as view-model