Implements functions.