adding the proper loging funcitons