optimize data/pointer

will focus on I/O and data structure next