added functions implementations