Implementation of the functions

Functions tested and validated ofr submission