finished draft of answer output packet with all logic