about to change stuff to use more SQL