patterns and url utility functions moved