some work on logic