Finished two exercises for functions