Modified for getting input from user dinamically