Adding the handling of the button for building object