added layout functionality