new function organisation for register
new function organisation for register
new function organisation for register
test and function reorged