used begin-end, no modifification of user input