Solution fifth assignment