better error messages
add multi-version support