removed dependency on andand, cleaned up code