finished lecture on functions