complete LOCAL solution