Using a part of brunos code