replaced buttons with oninput event