Macros

set state internally. And error handling.