Updated after functions refactoring.