fixed bug, simplified trial.php