first version with output