changed the function layout.