messing with logging - this will need some cleanup...