use params instead of session to fix bug