some refactoring

Signed-off-by: Thomas Helmke <thomas.helmke@gmx.de>