had to change order of stuff to make it compile