added methods to control flow