logic done