with ifs and whiles (whales ^_^ )