fixed lambda addition, streamlined usage of temp