Trinary exercise | 1st iteration