Implement logic for dynamic mapping