fixed usr input and added end op