First version

+ typedef (instead of define)
+ asserts
- return in void function