do code more portable
use bool prototype where appropriate