moved to document ready from onclick