Got it mostly working