completed all functions again