add csv support

refactor command arguments