ADD: comments added for functions