added porosity functionality