removed inline js from html and fixed onclick handling in js file
added the functionality for refactor: named function, user input, and parsed integer