Implementation of a simple virtualmachine