work in progress on applying vote in thread.php - all untested