Second part of third assignment