Just a detail but unless @installed can contain non-boolean values, there's no reason to compare it to true. Just return it as is.