worked on issue #2 and #4

hopefully did it right