add functions for interactive use