added functions definition