Added buttons processing