changed test to use cookie