More work on boundary extension algorithm