refactoring user struct to represent actual json structure