built out data frame

Building data frame now. However, it looks like there are some issues in
the algorithm. Need to do some more research.