fix to be non-nested structure