adding control flow stuff