memory issues. prob switching to mongodb