added function to check if url has certain extenstion