implemented counter edit ui functionality