improved prompt validation

if a user does not enter an integer the prompt is shown again