some logging added to remove undefineds