Adding back some logic