Added method to register button