Added cube function