functionality for data buttons