correct url. clean up code