writing data from params to data object