improve program / add ability to repetition