updated model view to use more sql step towards dynamic pages

yay.