it does what I want, but wow I feel dumb