added more input textfields and modified the method