implemented main pointer functionalities. TO DO: prevent pointer duplications