Use the checkURL func and remove magic