improve code
Begin to write vm