still messy but faster
?