copying in willis code from session 4
copying willis code from session 4