completed magevm for frontend usage