pass generators in as object