Completed functions with comments