removed redundant error checking from logic.php