some refactoring

Signed-off-by: Stephan Kühne <stkuehne@gmx.de>