Added helper function