* some code reorganisation