cleaned button code