Added functions from previous project