sigh, not really as clean as I'd like...