changed way to determine jquery object