the staging logic from my myminix project