working towards external code allocation