in progress to add 'populate' function. needs more work todo