fixed nesting, looks good so far