fixed errors and variable assignments; commented out error_log