adding code for compiled regex