added input mechanism with user interaciton