alp improvement: lazy imports

import dependencies of rarely used functions only when those functions are called