Added button logic