another failed attempt at cube