added button functionality with javascript