refactor message handling schedule