could be moved into the if() aswell?