added bool rather than double