name refactor
added test for boundary condition + refactoring