took me a day to figure out how this stuff works.. in case others are interested