updated to debug second button and incorporate with html