optimized the population of subdocuments

Signed-off-by: Alexander Knapstein <alexander.knapstein@inspirationlabs.com>