adding formatting, fixing struct member accessing