some more refacto yayy