fixed struct fields, added json tags for marshall
fixed formatting