added separate function