simplified code in result().
Added curly braces for code consistency