removed old TODO
remove unnecessary let
use when-not instead of if-not