Added helper funcion