fix logging
updated functions