Add allen logic