improve layout and add some functionality