updated logic.php for section