Modified layout and function