starting work on logHistory function'