Refined implementation