working if-function again