added logs within it.