added .empty to click function