coding #123 fixing the button behavoir