layout, sensor callback