finished writing testing functions, exec_expand and kushal's regexp