moved state functions to VM