maybe extend this function and make it posible to pass other values, then the other code looks nicer