finished basic psuedo for data handling