move mission handling to custom post file