Improved the entertain function