Removed print from generate function