Added more checks
Now with URL parameter