logging functionality added