add functions for buttons