adjusted to recent version changes