refactores some stuff #7