initial implementation of generator