some helpers, a bug