log and stats added