add basic activity order function