generate pictures controller
hacked pics index, will improve later