now checks for button element along with inout tyoe button