finally got it all working