float ensurance and better use of lambda