modified the external dir accordingly