I'd start by checking out how the cubix code works and go from there - Mudlet