now the main takes userinput and validates it.