Fixed regex bugs and updated new paramaters