Gonna have to refactor again :(