convert lambda to proc to supress false warning