reimplemented model, working cookies, new structure