lambda now working for most cases