changed do log cal as a private method