extracted constants and added version fallback