Update

finalizing the first function