More logic done