adjust the layout and updated the api