Adapted to jeny's proposition