more or less working now. default values are bad and persits