still trying to correct some pointer issues