simple jvm and dvm implmentation for teaching