work on logic