simplify code and add simple shell interactions