added hooks for vm handeling