refactor initializing

Signed-off-by: Markus Lamm <markus Lamm@googlemail.com>