added default argument for data
added numpy array writer