fixed null value issues
removed console.log