generate attach program