updated null cases and added word generator