moved log statements