working hw3, still unsure of flags