move to template class for ID
add range for frames support