updated for multi-version support