changing 'getElementById in  - avoiding error