Updated experimental double based variant (commented out).