functions v1

1st versions of the functions for assignment