fixed 'areAll' function, now works as required