completed all functions