added type to logging as well.