refactor code

new layout