Changed return value to pointer for efficiency (kicking Java habits)