reworked Cubes example with OOP and PVector