Updated to work with habitat