trying to abstract log stuff