started storing costs
added a few functions that parse incoming data