working on logic stack