button: refactoring API