same here, SGMatrix handles memory making code cleaner