all code enclosed in document ready function