implemented custom comparions to the code