holy crap got it all working - need to clean up though