Implements functions