Implements functions for programming assignment