first hint solved. See comments