implemented dynamic class loading