delete secrets and votes algorithm works before page load now