implemented proper button clicks