append button function