added categorylist and pagelist. also actually connects to db