refactored formUrl definition