eliminate an if-statement