More model friendly implementation