trying to implement csv API