put tags into proper object