Made buttons functional