Refined mapping algorithm