Updated version to represent function