modified the solution of first missing positive