made buttons functional