Updated to prevent test failure

Updated to incorporate edge cases