updated with something that actually works