made a couple things less hacky because sylvan told me to