working on boundary cases