changed jquery onready to native js