got it roughly working...