Added functionality for buttons