added few cases to demonstrate possible solutions