add try catch.
add comparison with chan.