enhance get app url function