moved @pictures in controller into db