making logic better