fixed to using cookies