implements functions