adding functionality to create button