added functions and extra file