rewrited to use .bind instead of eval