Added basic generate functionality