mission function implemetation