Add button function realized

add button using code