use document ready to call and assign