finish implement grid sdf