adjust layout structrue
add register function