button enabling and disaling functions added