fixing layout to get all buttons
bind prev and next buttons