refactor layout for vm