Generating properly cube