added functions logic regex