notes added for edge case handling for the solution