updated api for new layout.