added csv function
refactor csv method
refactor add method
add json output format
refactor remaining method