implemented challenge 2 (Barbayar)